Optimal. Leaf size=61 \[ \frac {c x}{a^2}-\frac {2 c \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}-\frac {5 c \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {3988, 3862,
4004, 3879, 3881} \begin {gather*} -\frac {5 c \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)}-\frac {2 c \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)^2}+\frac {c x}{a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3862
Rule 3879
Rule 3881
Rule 3988
Rule 4004
Rubi steps
\begin {align*} \int \frac {c-c \sec (e+f x)}{(a+a \sec (e+f x))^2} \, dx &=\frac {\int \left (\frac {c}{(1+\sec (e+f x))^2}-\frac {c \sec (e+f x)}{(1+\sec (e+f x))^2}\right ) \, dx}{a^2}\\ &=\frac {c \int \frac {1}{(1+\sec (e+f x))^2} \, dx}{a^2}-\frac {c \int \frac {\sec (e+f x)}{(1+\sec (e+f x))^2} \, dx}{a^2}\\ &=-\frac {2 c \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}-\frac {c \int \frac {-3+\sec (e+f x)}{1+\sec (e+f x)} \, dx}{3 a^2}-\frac {c \int \frac {\sec (e+f x)}{1+\sec (e+f x)} \, dx}{3 a^2}\\ &=\frac {c x}{a^2}-\frac {2 c \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}-\frac {c \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}-\frac {(4 c) \int \frac {\sec (e+f x)}{1+\sec (e+f x)} \, dx}{3 a^2}\\ &=\frac {c x}{a^2}-\frac {2 c \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}-\frac {5 c \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.34, size = 113, normalized size = 1.85 \begin {gather*} \frac {c \sec \left (\frac {e}{2}\right ) \sec ^3\left (\frac {1}{2} (e+f x)\right ) \left (9 f x \cos \left (\frac {f x}{2}\right )+9 f x \cos \left (e+\frac {f x}{2}\right )+3 f x \cos \left (e+\frac {3 f x}{2}\right )+3 f x \cos \left (2 e+\frac {3 f x}{2}\right )-24 \sin \left (\frac {f x}{2}\right )+18 \sin \left (e+\frac {f x}{2}\right )-14 \sin \left (e+\frac {3 f x}{2}\right )\right )}{24 a^2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 46, normalized size = 0.75
method | result | size |
derivativedivides | \(\frac {c \left (\frac {\left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3}-2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{f \,a^{2}}\) | \(46\) |
default | \(\frac {c \left (\frac {\left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3}-2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{f \,a^{2}}\) | \(46\) |
norman | \(\frac {\frac {c x}{a}-\frac {2 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {c \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a f}}{a}\) | \(50\) |
risch | \(\frac {c x}{a^{2}}-\frac {2 i c \left (9 \,{\mathrm e}^{2 i \left (f x +e \right )}+12 \,{\mathrm e}^{i \left (f x +e \right )}+7\right )}{3 f \,a^{2} \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{3}}\) | \(55\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 129 vs.
\(2 (61) = 122\).
time = 0.50, size = 129, normalized size = 2.11 \begin {gather*} -\frac {c {\left (\frac {\frac {9 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}{a^{2}} - \frac {12 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a^{2}}\right )} + \frac {c {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2}}}{6 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.32, size = 92, normalized size = 1.51 \begin {gather*} \frac {3 \, c f x \cos \left (f x + e\right )^{2} + 6 \, c f x \cos \left (f x + e\right ) + 3 \, c f x - {\left (7 \, c \cos \left (f x + e\right ) + 5 \, c\right )} \sin \left (f x + e\right )}{3 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} + 2 \, a^{2} f \cos \left (f x + e\right ) + a^{2} f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {c \left (\int \frac {\sec {\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \left (- \frac {1}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\right )\, dx\right )}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.49, size = 53, normalized size = 0.87 \begin {gather*} \frac {\frac {3 \, {\left (f x + e\right )} c}{a^{2}} + \frac {a^{4} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 6 \, a^{4} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a^{6}}}{3 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.34, size = 41, normalized size = 0.67 \begin {gather*} \frac {c\,x}{a^2}-\frac {c\,\left (6\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\right )}{3\,a^2\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________